import {getAllBrand} from '@/api/brand.js'
import {getAllCategoryWithChildren} from '@/api/category.js'

let mixin = {
	data(){
		return {
			cateList:[],		//商品分类信息
			brandList:[]
		}
	},
	methods:{
		//获取商品分类信息
		getCateList(){
			//发送请求，获取分类以及子分类
			getAllCategoryWithChildren()
			.then((data)=>{
				this.cateList = data.data;
			})
		},
		//获取品牌列表
		getBrandList(){
			getAllBrand()
			.then((data)=>{
				this.brandList = data.data;
			})
		}
	}
}
export default mixin;
